# Copyright (C) 2011 Jaakko Vuori
#
# This file is part of ShredMate.
# For more information, see <http://code.google.com/p/shredmate/>
#
# ShredMate is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# ShredMate is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ShredMate.  If not, see <http://www.gnu.org/licenses/>.

QT       -= gui

contains(QT_CONFIG, multimedia): {
    QT += multimedia
} else {
    CONFIG += mobility
    MOBILITY = multimedia
}

TARGET = shredmateengine
TEMPLATE = lib

DEFINES += SHREDMATEENGINE_LIBRARY

SOURCES += shredmateengine.cpp \
    mp3pcmbuffer.cpp \
    pcmgenerator.cpp \
    marker.cpp \
    range.cpp

HEADERS += shredmateengine.h\
        shredmateengine_global.h \
    abstractpcmbuffer.h \
    mp3pcmbuffer.h \
    pcmgenerator.h \
    marker.h \
    range.h

symbian {
    MMP_RULES += EXPORTUNFROZEN
    TARGET.UID3 = 0xE083A311
    TARGET.CAPABILITY = 
    TARGET.EPOCALLOWDLLDATA = 1
    addFiles.sources = shredmateengine.dll
    addFiles.path = !:/sys/bin
    DEPLOYMENT += addFiles
}

unix:!symbian {
    LIBS += /usr/lib/libmpg123.so
    LIBS += /usr/lib/x86_64-linux-gnu/libsndfile.so

    maemo5 {
        target.path = /opt/usr/lib
    } else {
        target.path = /usr/lib
    }
    INSTALLS += target
}

win32 {
    !exists("mpg123/include") warning(mpg123 not found. Run fetch_libmpg123_win.py)
    OTHER_FILES += fetch_libmpg123_win.py
    INCLUDEPATH += mpg123/include
    LIBS += $$PWD/mpg123/lib/libmpg123.dll.a
}
